package com.woniuxy.dudugua.service.impl;

import com.woniuxy.dudugua.entity.Category;
import com.woniuxy.dudugua.mapper.CategoryMapper;
import com.woniuxy.dudugua.mapper.ProductMapper;
import com.woniuxy.dudugua.service.OverseasService;
import com.woniuxy.dudugua.util.view.OverseasView;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OverseasServiceImpl implements OverseasService {
    @Resource
    private ProductMapper  productMapper;
    @Resource
    private CategoryMapper  categoryMapper;
    @Override
    public List<OverseasView> selectByProductOverseas() throws Exception {
        List<OverseasView> overseasViews = productMapper.selectByProductOverseas();
        if(overseasViews!=null){
            return  overseasViews;
        }
        return null;
    }

    @Override
    public List<Category> selectByProductOverseasSon() throws Exception {
        List<Category> categories = categoryMapper.selectByProductOverseasSon();
        if(categories!=null){
            return   categories;
        }
        return null;
    }
}
